package com.bcxj.apiboss.controller;

import com.bcxj.apiboss.service.CarService;
import com.bcxj.internalcommon.dto.ResponseResult;
import com.bcxj.internalcommon.entity.Car;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: CarController
 * Package: com.bcxj.apiboss.controller
 * Description:
 *
 * @Author BCXJ
 * @Create 2024/10/20 16:51
 * @Version 1.0
 * @Since 1.0
 */
@RestController
@RequestMapping("/car")
public class CarController {

    @Autowired
    private CarService carService;

    /**
     * 添加车辆
     * @param car
     * @return
     */
    @PostMapping
    public ResponseResult addCar(@RequestBody Car car) {
        return carService.addCar(car);
    }
}
